package rolesystem.middle.utilityclasses;

import java.io.Serializable;


public class MessagePayload implements Serializable
{
	private int agent_id;
	private PositionSq found_position;
	public Square square;
	public KnownEnvironment knownEnvironment;
	
	public MessagePayload()
	{
		this.agent_id=-1;
		this.found_position=new PositionSq(0,0);
		this.square=null;
		this.knownEnvironment=null;
	}
	
	public MessagePayload(int agent_id)
	{
		this.agent_id=agent_id;
		this.found_position=new PositionSq(0,0);
		this.square=null;
		this.knownEnvironment=null;
	}
	
	public MessagePayload(int agent_id,PositionSq init_position)
	{
		this.agent_id=agent_id;
		this.found_position=new PositionSq(init_position);
		this.square=null;
		this.knownEnvironment=null;
	}
	
	public MessagePayload(int agent_id,PositionSq init_position, Square init_square)
	{
		this.agent_id=agent_id;
		this.found_position=new PositionSq(init_position);
		this.square=new Square(init_square);
		this.knownEnvironment=null;
	}
	
	public MessagePayload(int agent_id,PositionSq init_position, Square init_square,KnownEnvironment knownEnvironment)
	{
		this.agent_id=agent_id;
		this.found_position=new PositionSq(init_position);
		this.square=new Square(init_square);
		this.knownEnvironment=knownEnvironment;
	}
	
	public MessagePayload(KnownEnvironment knownEnvironment)
	{
		this.agent_id=-1;
		this.found_position=new PositionSq(0,0);
		this.square=null;
		this.knownEnvironment=knownEnvironment;
	}
	
	public int getAgentID()
	{
		return agent_id;
	}
	
	public void setAgentID(final int agent_id)
	{
		this.agent_id=agent_id;
	}
	
	public PositionSq getPosition()
	{
		return found_position;
	}
	
	public void setPosition(final PositionSq pos)
	{
		this.found_position.set(pos);
	}
	
	public Square getSquare()
	{
		return this.square;
	}
	
	public void setSquare(final Square newSquare)
	{
		this.square=newSquare; //FIXME
	}
	
	public KnownEnvironment getKnownEnvironment()
	{
		return this.knownEnvironment;
	}
	
	public void setKnownEnvironment(final KnownEnvironment knownEnvironment)
	{
		this.knownEnvironment=knownEnvironment; //FIXME
	}
	
	
}
